<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.EditBillTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.EditBillLabel_idBill}" for="idBill" />
                    <h:inputText id="idBill" value="#{billController.selected.idBill}" title="#{bundle.EditBillTitle_idBill}" required="true" requiredMessage="#{bundle.EditBillRequiredMessage_idBill}"/>
                    <h:outputLabel value="#{bundle.EditBillLabel_createDate}" for="createDate" />
                    <h:inputText id="createDate" value="#{billController.selected.createDate}" title="#{bundle.EditBillTitle_createDate}" >
                        <f:convertDateTime pattern="MM/dd/yyyy HH:mm:ss" />
                    </h:inputText>
                    <h:outputLabel value="#{bundle.EditBillLabel_billNumber}" for="billNumber" />
                    <h:inputText id="billNumber" value="#{billController.selected.billNumber}" title="#{bundle.EditBillTitle_billNumber}" required="true" requiredMessage="#{bundle.EditBillRequiredMessage_billNumber}"/>
                    <h:outputLabel value="#{bundle.EditBillLabel_billTotal}" for="billTotal" />
                    <h:inputText id="billTotal" value="#{billController.selected.billTotal}" title="#{bundle.EditBillTitle_billTotal}" required="true" requiredMessage="#{bundle.EditBillRequiredMessage_billTotal}"/>
                    <h:outputLabel value="#{bundle.EditBillLabel_billReminder}" for="billReminder" />
                    <h:inputText id="billReminder" value="#{billController.selected.billReminder}" title="#{bundle.EditBillTitle_billReminder}" />
                    <h:outputLabel value="#{bundle.EditBillLabel_billCach}" for="billCach" />
                    <h:inputText id="billCach" value="#{billController.selected.billCach}" title="#{bundle.EditBillTitle_billCach}" />
                    <h:outputLabel value="#{bundle.EditBillLabel_docNum}" for="docNum" />
                    <h:inputText id="docNum" value="#{billController.selected.docNum}" title="#{bundle.EditBillTitle_docNum}" />
                    <h:outputLabel value="#{bundle.EditBillLabel_disCount}" for="disCount" />
                    <h:inputText id="disCount" value="#{billController.selected.disCount}" title="#{bundle.EditBillTitle_disCount}" />
                    <h:outputLabel value="#{bundle.EditBillLabel_nonexistentFlag}" for="nonexistentFlag" />
                    <h:inputText id="nonexistentFlag" value="#{billController.selected.nonexistentFlag}" title="#{bundle.EditBillTitle_nonexistentFlag}" />
                    <h:outputLabel value="#{bundle.EditBillLabel_exporterID}" for="exporterID" />
                    <h:selectOneMenu id="exporterID" value="#{billController.selected.exporterID}" title="#{bundle.EditBillTitle_exporterID}" >
                        <f:selectItems value="#{exporterController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.EditBillLabel_customerID}" for="customerID" />
                    <h:selectOneMenu id="customerID" value="#{billController.selected.customerID}" title="#{bundle.EditBillTitle_customerID}" >
                        <f:selectItems value="#{customerController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                </h:panelGrid>
                <h:commandLink action="#{billController.update}" value="#{bundle.EditBillSaveLink}"/>
                <br />
                <br />
                <h:commandLink action="View" value="#{bundle.EditBillViewLink}" immediate="true"/>
                <br />
                <h:commandLink action="#{billController.prepareList}" value="#{bundle.EditBillShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.EditBillIndexLink}" action="/index" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
